From 34af96ed586fa4594453fabccbd87a5eb686ff16 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 5 Oct 2018 16:24:56 +0200 Subject: [PATCH] fix uninitialized variable error in do_poll() Now that CONFIG_HVM can (and should) be turned off for the shim, gcc 8.2 apparently is no longer sure that "port" is indeed initialized at if ( sched_poll->nr_ports == 1 ) v->poll_evtchn = port; It doesn't look to be impossible for the compiler to prove it is not, but we also can't rely on that to be the case. Add an initializer. Signed-off-by: Jan Beulich Acked-by: Wei Liu --- xen/common/schedule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index f426fd8202..a957c5e57c 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -1014,7 +1014,7 @@ static long do_poll(struct sched_poll *sched_poll) { struct vcpu *v = current; struct domain *d = v->domain; - evtchn_port_t port; + evtchn_port_t port = 0; long rc; unsigned int i; -- 2.30.2